<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
           prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
           prefix="html" %>
<%@page import="com.sql.Sql" %>
<html>
    <head>
        <meta http-equiv="Content-Type"
              content="text/html; charset=UTF-8">
        <title>Struts - Musica</title>
        <style type="text/css">
            @import "/musica/musica.css";
        </style>
    </head>
    <body>
        <%
        String idCategoria = request.getParameter("idCategoria");

        if (idCategoria == null) {
            String msg = "Ingreso incorrecto!";
            request.getSession().setAttribute("msg", msg);
            response.sendRedirect("mensaje.jsp");
        } else {
            Object categoria = Sql.getCampo(
                    "SELECT categoria FROM categorias " +
                    "WHERE idCategoria=" + idCategoria);
        %>
        <p>&nbsp;</p>
        <p class="titulo">Retirar categor&iacute;a</p>
        <html:form action="logCategoria">
            <html:hidden property="accion" value="DEL" />
            <html:hidden property="idCategoria"
                         value="<%=idCategoria%>" />
            <table border="0">
                <tr>
                    <td>Categor&iacute;a</td>
                    <td>
                        <html:text property="categoria"
                                   value="<%=categoria.toString()%>"
                                   readonly="true" size="30" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2"><br>
                        <html:submit value="Retirar" />
                    </td>
                </tr>
            </table>
        </html:form>
        <p class="center">
            <a href="/musica/portada.html">Home</a>
        </p>
        <%}%>
    </body>
</html>


